package palette

import "image/color"

var Xterm = []color.Color{
	color.RGBA{0x0, 0x0, 0x0, 0x0},
	color.RGBA{0x80, 0x0, 0x0, 0xff},
	color.RGBA{0x0, 0x80, 0x0, 0xff},
	color.RGBA{0x80, 0x80, 0x0, 0xff},
	color.RGBA{0x0, 0x0, 0x80, 0xff},
	color.RGBA{0x80, 0x0, 0x80, 0xff},
	color.RGBA{0x0, 0x80, 0x80, 0xff},
	color.RGBA{0xc0, 0xc0, 0xc0, 0xff},
	color.RGBA{0x80, 0x80, 0x80, 0xff},
	color.RGBA{0xff, 0x0, 0x0, 0xff},
	color.RGBA{0x0, 0xff, 0x0, 0xff},
	color.RGBA{0xff, 0xff, 0x0, 0xff},
	color.RGBA{0x0, 0x0, 0xff, 0xff},
	color.RGBA{0xff, 0x0, 0xff, 0xff},
	color.RGBA{0x0, 0xff, 0xff, 0xff},
	color.RGBA{0xff, 0xff, 0xff, 0xff},
	color.RGBA{0x0, 0x0, 0x0, 0xff},
	color.RGBA{0x0, 0x0, 0x5f, 0xff},
	color.RGBA{0x0, 0x0, 0x87, 0xff},
	color.RGBA{0x0, 0x0, 0xaf, 0xff},
	color.RGBA{0x0, 0x0, 0xd7, 0xff},
	color.RGBA{0x0, 0x0, 0xff, 0xff},
	color.RGBA{0x0, 0x5f, 0x0, 0xff},
	color.RGBA{0x0, 0x5f, 0x5f, 0xff},
	color.RGBA{0x0, 0x5f, 0x87, 0xff},
	color.RGBA{0x0, 0x5f, 0xaf, 0xff},
	color.RGBA{0x0, 0x5f, 0xd7, 0xff},
	color.RGBA{0x0, 0x5f, 0xff, 0xff},
	color.RGBA{0x0, 0x87, 0x0, 0xff},
	color.RGBA{0x0, 0x87, 0x5f, 0xff},
	color.RGBA{0x0, 0x87, 0x87, 0xff},
	color.RGBA{0x0, 0x87, 0xaf, 0xff},
	color.RGBA{0x0, 0x87, 0xd7, 0xff},
	color.RGBA{0x0, 0x87, 0xff, 0xff},
	color.RGBA{0x0, 0xaf, 0x0, 0xff},
	color.RGBA{0x0, 0xaf, 0x5f, 0xff},
	color.RGBA{0x0, 0xaf, 0x87, 0xff},
	color.RGBA{0x0, 0xaf, 0xaf, 0xff},
	color.RGBA{0x0, 0xaf, 0xd7, 0xff},
	color.RGBA{0x0, 0xaf, 0xff, 0xff},
	color.RGBA{0x0, 0xd7, 0x0, 0xff},
	color.RGBA{0x0, 0xd7, 0x5f, 0xff},
	color.RGBA{0x0, 0xd7, 0x87, 0xff},
	color.RGBA{0x0, 0xd7, 0xaf, 0xff},
	color.RGBA{0x0, 0xd7, 0xd7, 0xff},
	color.RGBA{0x0, 0xd7, 0xff, 0xff},
	color.RGBA{0x0, 0xff, 0x0, 0xff},
	color.RGBA{0x0, 0xff, 0x5f, 0xff},
	color.RGBA{0x0, 0xff, 0x87, 0xff},
	color.RGBA{0x0, 0xff, 0xaf, 0xff},
	color.RGBA{0x0, 0xff, 0xd7, 0xff},
	color.RGBA{0x0, 0xff, 0xff, 0xff},
	color.RGBA{0x5f, 0x0, 0x0, 0xff},
	color.RGBA{0x5f, 0x0, 0x5f, 0xff},
	color.RGBA{0x5f, 0x0, 0x87, 0xff},
	color.RGBA{0x5f, 0x0, 0xaf, 0xff},
	color.RGBA{0x5f, 0x0, 0xd7, 0xff},
	color.RGBA{0x5f, 0x0, 0xff, 0xff},
	color.RGBA{0x5f, 0x5f, 0x0, 0xff},
	color.RGBA{0x5f, 0x5f, 0x5f, 0xff},
	color.RGBA{0x5f, 0x5f, 0x87, 0xff},
	color.RGBA{0x5f, 0x5f, 0xaf, 0xff},
	color.RGBA{0x5f, 0x5f, 0xd7, 0xff},
	color.RGBA{0x5f, 0x5f, 0xff, 0xff},
	color.RGBA{0x5f, 0x87, 0x0, 0xff},
	color.RGBA{0x5f, 0x87, 0x5f, 0xff},
	color.RGBA{0x5f, 0x87, 0x87, 0xff},
	color.RGBA{0x5f, 0x87, 0xaf, 0xff},
	color.RGBA{0x5f, 0x87, 0xd7, 0xff},
	color.RGBA{0x5f, 0x87, 0xff, 0xff},
	color.RGBA{0x5f, 0xaf, 0x0, 0xff},
	color.RGBA{0x5f, 0xaf, 0x5f, 0xff},
	color.RGBA{0x5f, 0xaf, 0x87, 0xff},
	color.RGBA{0x5f, 0xaf, 0xaf, 0xff},
	color.RGBA{0x5f, 0xaf, 0xd7, 0xff},
	color.RGBA{0x5f, 0xaf, 0xff, 0xff},
	color.RGBA{0x5f, 0xd7, 0x0, 0xff},
	color.RGBA{0x5f, 0xd7, 0x5f, 0xff},
	color.RGBA{0x5f, 0xd7, 0x87, 0xff},
	color.RGBA{0x5f, 0xd7, 0xaf, 0xff},
	color.RGBA{0x5f, 0xd7, 0xd7, 0xff},
	color.RGBA{0x5f, 0xd7, 0xff, 0xff},
	color.RGBA{0x5f, 0xff, 0x0, 0xff},
	color.RGBA{0x5f, 0xff, 0x5f, 0xff},
	color.RGBA{0x5f, 0xff, 0x87, 0xff},
	color.RGBA{0x5f, 0xff, 0xaf, 0xff},
	color.RGBA{0x5f, 0xff, 0xd7, 0xff},
	color.RGBA{0x5f, 0xff, 0xff, 0xff},
	color.RGBA{0x87, 0x0, 0x0, 0xff},
	color.RGBA{0x87, 0x0, 0x5f, 0xff},
	color.RGBA{0x87, 0x0, 0x87, 0xff},
	color.RGBA{0x87, 0x0, 0xaf, 0xff},
	color.RGBA{0x87, 0x0, 0xd7, 0xff},
	color.RGBA{0x87, 0x0, 0xff, 0xff},
	color.RGBA{0x87, 0x5f, 0x0, 0xff},
	color.RGBA{0x87, 0x5f, 0x5f, 0xff},
	color.RGBA{0x87, 0x5f, 0x87, 0xff},
	color.RGBA{0x87, 0x5f, 0xaf, 0xff},
	color.RGBA{0x87, 0x5f, 0xd7, 0xff},
	color.RGBA{0x87, 0x5f, 0xff, 0xff},
	color.RGBA{0x87, 0x87, 0x0, 0xff},
	color.RGBA{0x87, 0x87, 0x5f, 0xff},
	color.RGBA{0x87, 0x87, 0x87, 0xff},
	color.RGBA{0x87, 0x87, 0xaf, 0xff},
	color.RGBA{0x87, 0x87, 0xd7, 0xff},
	color.RGBA{0x87, 0x87, 0xff, 0xff},
	color.RGBA{0x87, 0xaf, 0x0, 0xff},
	color.RGBA{0x87, 0xaf, 0x5f, 0xff},
	color.RGBA{0x87, 0xaf, 0x87, 0xff},
	color.RGBA{0x87, 0xaf, 0xaf, 0xff},
	color.RGBA{0x87, 0xaf, 0xd7, 0xff},
	color.RGBA{0x87, 0xaf, 0xff, 0xff},
	color.RGBA{0x87, 0xd7, 0x0, 0xff},
	color.RGBA{0x87, 0xd7, 0x5f, 0xff},
	color.RGBA{0x87, 0xd7, 0x87, 0xff},
	color.RGBA{0x87, 0xd7, 0xaf, 0xff},
	color.RGBA{0x87, 0xd7, 0xd7, 0xff},
	color.RGBA{0x87, 0xd7, 0xff, 0xff},
	color.RGBA{0x87, 0xff, 0x0, 0xff},
	color.RGBA{0x87, 0xff, 0x5f, 0xff},
	color.RGBA{0x87, 0xff, 0x87, 0xff},
	color.RGBA{0x87, 0xff, 0xaf, 0xff},
	color.RGBA{0x87, 0xff, 0xd7, 0xff},
	color.RGBA{0x87, 0xff, 0xff, 0xff},
	color.RGBA{0xaf, 0x0, 0x0, 0xff},
	color.RGBA{0xaf, 0x0, 0x5f, 0xff},
	color.RGBA{0xaf, 0x0, 0x87, 0xff},
	color.RGBA{0xaf, 0x0, 0xaf, 0xff},
	color.RGBA{0xaf, 0x0, 0xd7, 0xff},
	color.RGBA{0xaf, 0x0, 0xff, 0xff},
	color.RGBA{0xaf, 0x5f, 0x0, 0xff},
	color.RGBA{0xaf, 0x5f, 0x5f, 0xff},
	color.RGBA{0xaf, 0x5f, 0x87, 0xff},
	color.RGBA{0xaf, 0x5f, 0xaf, 0xff},
	color.RGBA{0xaf, 0x5f, 0xd7, 0xff},
	color.RGBA{0xaf, 0x5f, 0xff, 0xff},
	color.RGBA{0xaf, 0x87, 0x0, 0xff},
	color.RGBA{0xaf, 0x87, 0x5f, 0xff},
	color.RGBA{0xaf, 0x87, 0x87, 0xff},
	color.RGBA{0xaf, 0x87, 0xaf, 0xff},
	color.RGBA{0xaf, 0x87, 0xd7, 0xff},
	color.RGBA{0xaf, 0x87, 0xff, 0xff},
	color.RGBA{0xaf, 0xaf, 0x0, 0xff},
	color.RGBA{0xaf, 0xaf, 0x5f, 0xff},
	color.RGBA{0xaf, 0xaf, 0x87, 0xff},
	color.RGBA{0xaf, 0xaf, 0xaf, 0xff},
	color.RGBA{0xaf, 0xaf, 0xd7, 0xff},
	color.RGBA{0xaf, 0xaf, 0xff, 0xff},
	color.RGBA{0xaf, 0xd7, 0x0, 0xff},
	color.RGBA{0xaf, 0xd7, 0x5f, 0xff},
	color.RGBA{0xaf, 0xd7, 0x87, 0xff},
	color.RGBA{0xaf, 0xd7, 0xaf, 0xff},
	color.RGBA{0xaf, 0xd7, 0xd7, 0xff},
	color.RGBA{0xaf, 0xd7, 0xff, 0xff},
	color.RGBA{0xaf, 0xff, 0x0, 0xff},
	color.RGBA{0xaf, 0xff, 0x5f, 0xff},
	color.RGBA{0xaf, 0xff, 0x87, 0xff},
	color.RGBA{0xaf, 0xff, 0xaf, 0xff},
	color.RGBA{0xaf, 0xff, 0xd7, 0xff},
	color.RGBA{0xaf, 0xff, 0xff, 0xff},
	color.RGBA{0xd7, 0x0, 0x0, 0xff},
	color.RGBA{0xd7, 0x0, 0x5f, 0xff},
	color.RGBA{0xd7, 0x0, 0x87, 0xff},
	color.RGBA{0xd7, 0x0, 0xaf, 0xff},
	color.RGBA{0xd7, 0x0, 0xd7, 0xff},
	color.RGBA{0xd7, 0x0, 0xff, 0xff},
	color.RGBA{0xd7, 0x5f, 0x0, 0xff},
	color.RGBA{0xd7, 0x5f, 0x5f, 0xff},
	color.RGBA{0xd7, 0x5f, 0x87, 0xff},
	color.RGBA{0xd7, 0x5f, 0xaf, 0xff},
	color.RGBA{0xd7, 0x5f, 0xd7, 0xff},
	color.RGBA{0xd7, 0x5f, 0xff, 0xff},
	color.RGBA{0xd7, 0x87, 0x0, 0xff},
	color.RGBA{0xd7, 0x87, 0x5f, 0xff},
	color.RGBA{0xd7, 0x87, 0x87, 0xff},
	color.RGBA{0xd7, 0x87, 0xaf, 0xff},
	color.RGBA{0xd7, 0x87, 0xd7, 0xff},
	color.RGBA{0xd7, 0x87, 0xff, 0xff},
	color.RGBA{0xd7, 0xaf, 0x0, 0xff},
	color.RGBA{0xd7, 0xaf, 0x5f, 0xff},
	color.RGBA{0xd7, 0xaf, 0x87, 0xff},
	color.RGBA{0xd7, 0xaf, 0xaf, 0xff},
	color.RGBA{0xd7, 0xaf, 0xd7, 0xff},
	color.RGBA{0xd7, 0xaf, 0xff, 0xff},
	color.RGBA{0xd7, 0xd7, 0x0, 0xff},
	color.RGBA{0xd7, 0xd7, 0x5f, 0xff},
	color.RGBA{0xd7, 0xd7, 0x87, 0xff},
	color.RGBA{0xd7, 0xd7, 0xaf, 0xff},
	color.RGBA{0xd7, 0xd7, 0xd7, 0xff},
	color.RGBA{0xd7, 0xd7, 0xff, 0xff},
	color.RGBA{0xd7, 0xff, 0x0, 0xff},
	color.RGBA{0xd7, 0xff, 0x5f, 0xff},
	color.RGBA{0xd7, 0xff, 0x87, 0xff},
	color.RGBA{0xd7, 0xff, 0xaf, 0xff},
	color.RGBA{0xd7, 0xff, 0xd7, 0xff},
	color.RGBA{0xd7, 0xff, 0xff, 0xff},
	color.RGBA{0xff, 0x0, 0x0, 0xff},
	color.RGBA{0xff, 0x0, 0x5f, 0xff},
	color.RGBA{0xff, 0x0, 0x87, 0xff},
	color.RGBA{0xff, 0x0, 0xaf, 0xff},
	color.RGBA{0xff, 0x0, 0xd7, 0xff},
	color.RGBA{0xff, 0x0, 0xff, 0xff},
	color.RGBA{0xff, 0x5f, 0x0, 0xff},
	color.RGBA{0xff, 0x5f, 0x5f, 0xff},
	color.RGBA{0xff, 0x5f, 0x87, 0xff},
	color.RGBA{0xff, 0x5f, 0xaf, 0xff},
	color.RGBA{0xff, 0x5f, 0xd7, 0xff},
	color.RGBA{0xff, 0x5f, 0xff, 0xff},
	color.RGBA{0xff, 0x87, 0x0, 0xff},
	color.RGBA{0xff, 0x87, 0x5f, 0xff},
	color.RGBA{0xff, 0x87, 0x87, 0xff},
	color.RGBA{0xff, 0x87, 0xaf, 0xff},
	color.RGBA{0xff, 0x87, 0xd7, 0xff},
	color.RGBA{0xff, 0x87, 0xff, 0xff},
	color.RGBA{0xff, 0xaf, 0x0, 0xff},
	color.RGBA{0xff, 0xaf, 0x5f, 0xff},
	color.RGBA{0xff, 0xaf, 0x87, 0xff},
	color.RGBA{0xff, 0xaf, 0xaf, 0xff},
	color.RGBA{0xff, 0xaf, 0xd7, 0xff},
	color.RGBA{0xff, 0xaf, 0xff, 0xff},
	color.RGBA{0xff, 0xd7, 0x0, 0xff},
	color.RGBA{0xff, 0xd7, 0x5f, 0xff},
	color.RGBA{0xff, 0xd7, 0x87, 0xff},
	color.RGBA{0xff, 0xd7, 0xaf, 0xff},
	color.RGBA{0xff, 0xd7, 0xd7, 0xff},
	color.RGBA{0xff, 0xd7, 0xff, 0xff},
	color.RGBA{0xff, 0xff, 0x0, 0xff},
	color.RGBA{0xff, 0xff, 0x5f, 0xff},
	color.RGBA{0xff, 0xff, 0x87, 0xff},
	color.RGBA{0xff, 0xff, 0xaf, 0xff},
	color.RGBA{0xff, 0xff, 0xd7, 0xff},
	color.RGBA{0xff, 0xff, 0xff, 0xff},
	color.RGBA{0x8, 0x8, 0x8, 0xff},
	color.RGBA{0x12, 0x12, 0x12, 0xff},
	color.RGBA{0x1c, 0x1c, 0x1c, 0xff},
	color.RGBA{0x26, 0x26, 0x26, 0xff},
	color.RGBA{0x30, 0x30, 0x30, 0xff},
	color.RGBA{0x3a, 0x3a, 0x3a, 0xff},
	color.RGBA{0x44, 0x44, 0x44, 0xff},
	color.RGBA{0x4e, 0x4e, 0x4e, 0xff},
	color.RGBA{0x58, 0x58, 0x58, 0xff},
	color.RGBA{0x62, 0x62, 0x62, 0xff},
	color.RGBA{0x6c, 0x6c, 0x6c, 0xff},
	color.RGBA{0x76, 0x76, 0x76, 0xff},
	color.RGBA{0x80, 0x80, 0x80, 0xff},
	color.RGBA{0x8a, 0x8a, 0x8a, 0xff},
	color.RGBA{0x94, 0x94, 0x94, 0xff},
	color.RGBA{0x9e, 0x9e, 0x9e, 0xff},
	color.RGBA{0xa8, 0xa8, 0xa8, 0xff},
	color.RGBA{0xb2, 0xb2, 0xb2, 0xff},
	color.RGBA{0xbc, 0xbc, 0xbc, 0xff},
	color.RGBA{0xc6, 0xc6, 0xc6, 0xff},
	color.RGBA{0xd0, 0xd0, 0xd0, 0xff},
	color.RGBA{0xda, 0xda, 0xda, 0xff},
	color.RGBA{0xe4, 0xe4, 0xe4, 0xff},
	color.RGBA{0xee, 0xee, 0xee, 0xff},
}

func Index(t color.RGBA) int {
	for cnt, c := range Xterm {
		if t == c {
			return cnt
		}
	}
	return -1
}
